package tgc.rj.zz.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import tgc.rj.zz.custom.CommonService;
import tgc.rj.zz.entity.Record;
import tgc.rj.zz.repository.RecordRepository;


@Service
public class RecordService extends CommonService<Record, Integer>{

	@Autowired
	private RecordRepository recordDAO;
	
	public List<Record> findByReader(Integer readerID) {
		
		return recordDAO.findByReader(readerID);
	}



	public List<Record> findByReaderAndAccredit(Integer readerID, String string) {
		
		return recordDAO.findByReaderAndAccredit(readerID,string);
	}



	public List<Record> findByEndDateLessThan(String date) {
		
		return recordDAO.findByEndDateLessThan(date);
	}



	public List<Record> findByEndDateLessThanAndAccredit(String date, String string) {
		return recordDAO.findByEndDateLessThanAndAccredit(date,string);
	}





	
}
